class CreateReservations < ActiveRecord::Migration
  def change
    create_table :reservations do |t|
      t.string :booking_code, :index => true # 订单id
      t.integer :train_id, :index => true #列车ｉｄ
      t.string :seat_number, :index => true #座位号
      t.integer :user_id, :index => true

      t.string :customer_name
      t.timestamps null: false
    end
  end
end
